package com.wabi.frame.components;

import javax.swing.JMenu;
import javax.swing.JMenuItem;

import com.wabi.action.AboutAction;
import com.wabi.action.MenuActionListener;

public class MainMenu extends JMenu {

	public MainMenu(){
		this.setText("Main menu");
		JMenuItem aboutItem= new JMenuItem();
		JMenuItem exitItem= new JMenuItem("Exit");
		
		//add event handling
		MenuActionListener listener = new MenuActionListener();
		AboutAction abAct = new AboutAction();
		exitItem.addActionListener(listener);
		aboutItem.setAction(abAct);
		aboutItem.setText("About");
		
	
		this.add(aboutItem);
		this.addSeparator();
		this.add(exitItem);

	}
}
